#include <iostream>
#include "Iterator.h"

int main()
{
	PersonCollection collection;
	collection.add(Person("Aiye", 22));
	collection.add(Person("Alice", 23));
	collection.add(Person("Bolob", 24));

	auto it = collection.createIterator();
	while (it->hasNext())
	{
		Person person = it->next();

		std::cout << person.getName() << "\t" << person.getAge() << std::endl;
	}

	delete it;

	return 0;
}